package chap3_10;

import java.util.Scanner;

public class Exer3_10_8 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int[]num=new int[10];
        int sum=0,amas=1;
        for(int i=0;i<10;i++){
            System.out.print("请输入第"+(i+1)+"个数：");
            num[i]=input.nextInt();
            sum+=num[i];
            amas*=num[i];
        }
        System.out.println("数组中各数的和为："+sum);
        System.out.println("数组中各数的积为："+amas);
    }
}
